1. Field of the Invention
The present invention relates to a cut mask preparation method and an apparatus therefor, and more particularly to a cut mask preparation method and an apparatus therefor for preferably preparing a cut mask by displaying color image data on a display screen for the purpose of preparing a printing/process film, or for preferably electronically cutting a necessary real region with a cut mask to extract the real region from a background region on the color image data.
2. Description of the Prior Art
For preparing a film of a printing/process original plate from color image data, there is sometimes met an occasion where a cut mask is formed for a unnecessary region (an background image region for example) and is used to cut a necessary real region. For instance, a cutting process is commonly employed in a case, for example, where only a necessary portion is cut out of a photographic document for its use, in cases where a square photographic document is trimmed therein into a heart shape for its use or in cases where an object in a photographic document is extracted and then synthesized with another photographic document for its use.
There are conventionally known varieties of techniques to prepare such a cut mask. In one technique, input image data is displayed on a display screen, the image on which is observed by an operator who in turn precisely designates a contour line of an object image to be cut and cuts the same.
In another technique, an operator indicates the color of a region which he is desirous to cut (a background region) while observing an image displayed on a display screen, whereby a cut line is automatically prepared.
In another further technique, an operator designates part of a background region which he is desirous to mask while observing an image displayed on a display screen, and he finds a change in the density of the region, whereby a cut line is automatically extracted on the basis of a density distribution that is yielded in consideration of a density change.
Further, in other techniques, the contour of a required picture pattern is traced onto a layout paper with a tracing machine for designation of cutting, or a tracing paper is placed on a photographic document to permit the contour of a necessary portion of the document to be written thereon and an unnecessary portion of the document to be smeared with a hatch for designation of cutting, whereby a cut mask and the like are prepared for synthesis in accordance with the resulting cutting designation.
However, printed matters include, in addition to those comprising a single color area, those gradually changing in colors, negative and positive films for color photography, and so on. Accordingly, for preparing a film plate by extracting only a particular object in such a color document such as a person or a furniture, etc., for example, there are overlapped regions of different luminosity, saturation, hue, so that the foregoing techniques fail to automatically prepare any faithful film plate.
For this reason, for any color film document, a desired film plate (Y, H, C, Bk) of the color document is manually prepared by projecting a film image of the document, preparing a mask corresponding to a cut area with the aid of an operator, and superimposing the film document and the resulting mask. This causes difficulties such that the efficiency of preparing a film plate is lowered owing to a complicated image of the film document and, hence, days required for a printing process are greatly increased, and so on.
To solve this, there is available the use of the maximum likelihood method. In the maximum likelihood method, a background region in an image, which is desirous to be cut, is designated by following steps. Namely, color image data corresponding the background region is read out to evaluate the mean density for each plate color and the covariance between plate colors. Further, the color image data is read out for each picture element and for each plate color to evaluate density distance data based on an identification function referring to the mean density for each plate color and the covariance between plate colors, and background region data is extracted referring to the density distance data and decided distance data.
The maximum likelihood method, however, also has a difficulty: in cases where a background is uniform, a cut image can be prepared by designating portions with the same picture element density which is called a density mask. However, in cases where the shadow of a real region is projected on the background region or where the background region has gradation (there are cases associated with each of luminosity, saturation and hue.), background portions at a plurality of proper locations must be designated resulting in an operator burdened with a load, and hence an unskilled operator fails to designate any proper background region.
To overcome such a difficulty, there is known a technique, as disclosed in Japanese laid-Open Patent Publication No. 1-298477, to achieve automatic cutting by primary component analysis and maximum likelihood method based on the density distribution of part in a background region. More specifically, a user determines an identification function based on the primary component analysis that estimates the axis of a density change based on the density distribution of a training area previously designated in the background region. Then, the user designates a predetermined region including the contour of an object region and substitutes each data in the predetermined region for the identification function to binary-code each data with the maximum likelihood method.
In the technique disclosed in the just-mentioned patent, however, there is a problem that the background region separated from the first primary component axis of the training area might be incorrectly judged as belonging to a real region. In a case, for example, where an elongated dense shadow lies in the vicinity of the contour, it is sometimes unlikely to designate the training area so as to include the shadow but without including the real entity. Although in such a case the background region could be judged to some extent by designating the training area not including the shadow and analyzing the chief component of the same, it is difficult to predict the background region when the color of the shadow is severely out of the first chief component axis of the distribution of the training area.
Furthermore, in a case where the background region has an image including two or more kinds of colors, the density distribution of the training area is greatly spread with a difficulty that the color or colors of the side of the real entity section might be incorrectly judged as belonging to that of the side of the background region.
Namely, in the technique to automatically prepare a cut line following the designation of colors, a color area similar to that of the background region which area is existent in the real entity region to be cut might be cut by mistake, and further the real entity region with any shadow, if existent, in the vicinity of the contour, might fail to be cut. Still more, in a case where any image which is difficult to be cut automatically is processed fully automatically, it takes much time for evaluation thereof and it fails to be correctly cut with much wasteful time for correction thereof.
Furthermore, in the technique to faithfully cut the background region following the contour line designated by an operator, as a matter of course it is time-consuming and laborious to the operator because of the need of designating the entire contour line of an image with use of a cursor and the like by the operator.
The present applicant has proposed an automatic cutting system in Japanese Patent Application No. 63-129997 as a technique associated with the present invention. The automatic cutting system is to prepare an estimation function by designating a background region as the training area and taking a first chief component axis (=direction of gradation) into consideration. The automatic cutting system however has some difficulties as follows: The system merely utilizes only information concerning the training area of the background region, so that a color range judged as belonging to the background region upon cutting the background region is likely to be narrowed and, hence, there is produced a color of the edge of the real entity region close to the background region left behind narrowed on the side of the background region when the real entity region is intended to be extracted by cutting with a result that there may be produced an unnatural contour line or a shadow portion may be judged incorrectly as belonging to the real entity region.
More specifically, this system, although dealing with the gradation and the shadow to some extent too, a concrete preparation method of the estimation function is different from that in the present invention, and the method has some points to be improved. More precisely, the system, which regards the training area as belonging to the background region even though the gradation of the training area is as extended as possible, may sometimes judge for any color quite different from the actual color of the training area to belong to the background region. The system therefore has a disadvantage that an unexpected color in the real entity region might be judged by mistake as belonging to the background region, thus leaving the need of improvement.